Fix broken implementation of tide