Fixed signaling and assertions

Signaling of master valid fixed (now lowered after operation)
Better error handling
Some error handling