Revert last commit, it had bugs