fix bug of checking outside of 5 limit