Fixed bug and updated comments.