Fixed it:
#define OLED_RESET 4 //changed this to 16 and now it works! I think it was continuously resetting.