Revert "reverted a bug ive introduced."

This reverts commit 58037f51641e7a794b3511b5d5c6ab127d692b1b.