modified for a bug