Solved a bug with the pain thing