bug fixes, using slightly less cheeky console.logs