Fixed bug in bot check function