By 8 November, the Germans realised that the advance along the coast had failed and that taking Ypres was impossible. Attacks by both sides had quickly been defeated and the opposing armies had improvised field defences, against which attacks were costly failures. By the end of the First Battle of Ypres in November 1914, both sides were exhausted, short of ammunition and suffering from collapses in morale; some infantry units refused orders. The mutual defeat of the First Battle of Flanders was followed by trench warfare, in which both sides tried to improve their positions as far as the winter weather, mutual exhaustion and chronic equipment and ammunition shortages allowed.