Fixed a bug causing slowness in code... Stupid typo..