Fixed more issues brought up in PR