Crashing bug fix on IDLE