Added function to push/pop gstate