bug fixing with incompatible type