Fix bug in portable stuff