checking now also works when the attacking piece is captured