Fixed some mistakes for #552