Addressed issues pointed out in comments