fixed sonar bug about magic numbers