I found a solution to this myself. It returns the default post type posts instead of excluding the custom post type which is fine for my needs. I updated the code above.