[Bug Fix][OSX] fix crash when running on debug