Bugfix + procedures