Fixed some bugs introduced by Robin