Fixing issues from tests