Fixed some bugs introduced by the updates