Fixed some code for the new update