Fixed some issues caused by rebasing