Q implemented Maxim's fix