Bugfix and reduce GPU usage