Fix bug with typing