Fixed bug in code smell