Merged mschnoell's changes which were accidentally stashed