Fixed various bugs and invalid states
Fixed spelling mistake