Added better completion handling