Fixed controller invoking twice issue