Fix undefined property accessed from entity_js module
Fix context for post-save triggers