Fixes bug in a controller test