Fixed issues that were introduced by merging