Fixed bug where error_log() wasn't called properly