added support for 32bit systems