re-order dependencies to avoid http://stackoverflow.com/a/25997647/1250580