Fixed bug in task #3