fixed a bug caused by me being stupid