more fixes for f017f9ee49a7f5a86f35d004fd316f54f1a59f54 and c28650b9b2f6d19228bc18b8be9abb0ab0e1839e