Task3 bug fixing