Fixed build script and re-fixed map event-type changing