Fix for apex redirection