Fixed a very critical bug