Added more limit checking to curper