Crash MKG after closing Time Registration module


In some cases, MKG could crash when closing the module. This error has been resolved.