fixing controller error