He probably just planned to kill Whitebeard later.

Or considering the situation, maybe his original plan was to just dig up Whitebeard's body after he died of natural causes.