fixed bugs from review