Fixed the issues Aran pointed out.