fixed casting to the caller