Fixed #1 and Fixed #8, two straightforward fixes