Fixed wrong type being assigned