Worked a bit on overflow proofing