Judge grants motion to dismiss bankruptcy