fixed bug that broke the whole thing