Fixed function not closed