Revert "Revert "small fixes""

This reverts commit 9d7a206e22ec69956ef3066c297cb454f411ee8d.