fixed returning custom data problem; started on #273