Small chanes in the code