Fixed issues that arose after merge