Bug fix -- misplaced statement(#234)