Fixed compile error (access violation)