Fixes for commit bfd8cdc