Fixed bug: made function in header inline