Fixed code for taking only legal action when there's only one.
Fixed another problem with the only legal action method.