Temporary hack for rand() support