Fixed status setting, now it should work properly in Debug and Release modes and at any point of application run