Added a0 and a1 conditions. Corrected visible errors but there's still
something wrong.