Fix invalid type error

Fix #1