Update for M4

Should resolve the issues in #3