fixed dieing error