attempt to fix this stupid logic