Fixed a bug that caused random prints