My TP command ain't working with negative numbers

Hello

This is the code I already have:

if (args[1] ~= nil and (args[2] == nil and args[3] == nil)) then

    -- tp to player

    local Player = Core.Functions.GetPlayer(tonumber(args[1]))

    if Player ~= nil then

        TriggerClientEvent('Core:Command:TeleportToPlayer', source, Player.PlayerData.source)

    else

        TriggerClientEvent('chatMessage', source, "SYSTEM", "error", "Player is not online!")

    end

else

    -- tp to location

    if args[1] ~= nil and args[2] ~= nil and args[3] ~= nil then

        local x = tonumber(args[1])

        local y = tonumber(args[2])

        local z = tonumber(args[3])

        TriggerClientEvent('Core:Command:TeleportToCoords', source, x, y, z)

    else

        TriggerClientEvent('chatMessage', source, "SYSTEM", "error", "Not every argument has been entered (x, y, z)")

    end

end

Everything works except when I want to tp myself to negative cooördinates, could someone help me with this?
Thanks in Advance