Added checking for negative sign