Moving onClick handler down to match the order things are called