Fixed problem with overflow