1. bug fixed on composition not cleared on switching to eng.

2. nullptr exception checks