Police nab wanted man after failed window escape