Make sure keysize is always int