solved bug

This is the simplest solution that I have time to come up with