Added guards against calling methods outside of the right state