Changes to support portability