BugFix

Fixed some bugs and adapted to common anode