synced with linux version.