Fix wrong type assignment