Fix depracation warnings for assert to use assert macro