fix crash and implement monster fight