Various fixes for completion