added modal ready callback and fixed complete callback behavior