Fixed dat frickin bug dammit javascript is confuzlling