Fixed the crashing bug!