Fixed all found bugs