Fixed the bug (take 3)