Fix bug in construction