Minor changes to divisibility checks