Added limit checks

Added outer and inner limits to remove abnormal values