Changed argument order to make it easier to detect mistakes.