Fixed some issues after merge