Change the code as suggested by @nvloff.