fixing overflow