Bug fix as advised by WillFa