Tried to fix bug
Think I fixed it