fixes in response to @coderoshi comments