making various fixes of mistakes that shouldn't've been made