Fix for appending forward slash to api.php