Fixed the issues @jvanderz22 pointed out in #225