Bugfixes

Values set to 0 to early which calculated some weird output. fixed