Fixing type bug