Fixed Off by one Error