fixed weird crash http://pastebin.com/xBKDwK3e