fixes for filename, bug fixes