Added  a safe mode to embedded code
Bug Fixes