fixed level bug (issue #4)