Fixing code for Brian demo